Re: [GENERAL] Making NULLs visible.
От | Herouth Maoz |
---|---|
Тема | Re: [GENERAL] Making NULLs visible. |
Дата | |
Msg-id | l03110701b2490a02606b@[194.90.105.243] обсуждение исходный текст |
Ответ на | Re: [GENERAL] Making NULLs visible. (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [GENERAL] Making NULLs visible.
|
Список | pgsql-general |
At 18:36 +0200 on 9/10/98, Bruce Momjian wrote: > I am always looking for suggestions on how to display nulls. It is on > the TODO list. Here is my suggestion, admittedly a bit cheeky: Implement an NVL function - one that dictates a NULL in a field and converts it to whatever value is required. Then, anybody who wants psql to display a null function can decide what is to be displayed on a per-query basis: SELECT a, nvl(b,'I am null!'), c FROM tab WHERE... Will give something like: a | ?column? | c ====|============|===== 10 | Moses | 100 20 | Solomon | 200 30 | I am null! | 300 40 | David | 400 50 | I am null! | 500 And so on... So, if someone wants \N, he'll put '\\N' in the NVL function, and if they want NULL, they'll put 'NULL', etc. NVL will be usefull for lots of stuff... Not only for this... Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma
В списке pgsql-general по дате отправления: